import "core-js/es/map";
import "core-js/es/set";
import "core-js/es/array/from";
import "core-js/es/array/includes";
import "core-js/features/promise";
// import "core-js/fn/promise";
// import "core-js/stable";
import "raf/polyfill";
import checkDevMode from "./modules/checkDevMode.js";
import "./css/main.css";
import "./css/ligw.scss";
import "@page/index/zen_init.css";
import Uts from "@module/Uts";
import App from "./router/router";
import ReactDOM from "react-dom";
import pageInit from "./modules/pageInit.js";
import ZenModal from "@module/../components/ZenUI/ZenModal/ZenModal";
import ZenUI from "@module/../components/ZenUI/ZenUI";
import "./P/modules/PConfig";
// 2. Plugins
// app.use({});

// 3. Model

// 4. Router

//全局配置

// const orgId = CookieUtils.getCookie("orgId");
global.hasLogin = false;
const loginTokenInfo = Uts.storage.get("loginTokenInfo"); //保留登录信息缓存

if (Uts.isLogin()) {
	let access_token = Uts.isLogin();
	global.$access_token = access_token;
	global.hasLogin = access_token ? true : false;
}

const isSupp = Uts.getCookie("id1");

if (isSupp) {
	global.hasLogin = false;
	global.isSupp = true;
}

// console.log(global.hasLogin)
// console.log(global.isSupp)

function Content() {
	return (
		<React.Fragment>
			<App />
			<ZenModal.initModal />
		</React.Fragment>
	);
}

ReactDOM.render(<Content />, document.getElementById("reactRoot"));

// 5. Start
